Responsive Typography by Jason Pamental

Responsive Typography by Jason Pamental

Author:Jason Pamental
Language: eng
Format: epub
ISBN: 9781491907092
Publisher: O'Reilly Media
Published: 2014-03-15T00:00:00+00:00


Add the Performance and Progression Flair

I’ll go into greater detail about what the Google Web Font Loader is in a moment, but for completeness I wanted to include the way to use it with your self-hosted fonts here (Example 5-3).

Example 5-3. Google Web Font Loader syntax for self-hosting

WebFontConfig = { custom: { families: ['OpenSans', 'My Other Font'], urls: ['/css/fonts.css'] } };

The families correspond to how you name fonts in your @font-face declarations, and the url of that CSS file must be referenced from your web root.

That’s pretty much all there is to it—until you start to worry about all the other bits to really finesse things. I’ll cover some examples of usage that apply to both self-hosting and services in just a little bit.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.